]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Reload icon on style changes only if necessary
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 30 Apr 2019 12:51:47 +0000 (14:51 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 30 Apr 2019 13:02:37 +0000 (15:02 +0200)
The parameters that may affect the icon on ::style-changed are more size
related than visual (we listen to icon theme changes for the latter). It
makes sense to just update the icon if the size came out different.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/524

src/st/st-icon.c

index 04d2d1d3cc1208028c14ea7c8513482272bf4f46..8b7015281decd3b72865303851bbbbd343226d48 100644 (file)
@@ -206,8 +206,8 @@ st_icon_style_changed (StWidget *widget)
     }
 
   priv->theme_icon_size = (int)(0.5 + st_theme_node_get_length (theme_node, "icon-size"));
-  st_icon_update_icon_size (self);
-  st_icon_update (self);
+  if (st_icon_update_icon_size (self))
+    st_icon_update (self);
 }
 
 static void